package com.it.user.mapper;

import com.it.user.domain.User;
import com.it.user.query.UserQuery;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface UserMapper {
    //新增
    void addUser(User user);
    //修改
    void updateUser(User user);
    //删除
    @Delete("delete from tb_user where id=#{id}")
    void deleteUser(Long id);
    //查询
    //User findOne(Long id);
    //查询所有
    @Select("select * from tb_user")
    List<User> findAll();
    //分页查询
    List<User> queryPage(UserQuery userQuery);
    //批量删除
    void batchUsers(Long[] ids);
}
